// 用于身份令牌的存取删
// 把key声明称一个常量
const TOKEN_KEY = 'hmtt80'
// 封装localstore的本地存储函数
export const setToken = (tokenObj) => {
    localStorage.setItem(TOKEN_KEY, JSON.stringify(tokenObj));
}
// 取
export const getToken = () => {
    return JSON.parse(localStorage.getItem(TOKEN_KEY))
}
// 删
export const delToken = () => {
    localStorage.removeItem(TOKEN_KEY)
}